<template>
  <div class="bot_nav_box">
    <van-tabbar route>
      <van-tabbar-item icon="home-o" to="/Home">首页</van-tabbar-item>
      <van-tabbar-item icon="search" to="/Categary" >分类</van-tabbar-item>
      <van-tabbar-item icon="shopping-cart-o" to="/Cart" :badge="cartGoods" >购物车</van-tabbar-item>
      <van-tabbar-item icon="user-o" to="/User" >我的</van-tabbar-item >
    </van-tabbar>
  </div>
</template>

<script>
export default {
  name: "TarBar",
  created(){},
  data() {
    return {
      goodsNum:0
    };
  },
  methods: {},
  computed:{
    cartGoods(){
      return this.$store.state.cartList.length
    }
  },
  watch:{
    cartGoods(){
    }
  }
};
</script>
<style scoped lang="less">

</style>